home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / networking / terms / kermit / b / ik0mac.asm < prev    next >
Encoding:
Assembly Source File  |  1992-09-29  |  33.3 KB  |  422 lines

  1. *COPY                                                 KW                00300000
  2.          MACRO                                                          00301000
  3. &LABEL   KW    &KW,&ADDR,&MIN=1                                         00302000
  4. .* Define a KW for the parser                                           00303000
  5. .*  &1: 'keyword' or GOTO (to define ptr to next keyword item) or nil   00304000
  6. .*  (to end a list), &2: address of handler (if &1 is a 'keyword') or   00305000
  7. .*  of next item (if &1 is GOTO) (A), &MIN=length of min. abrv          00306000
  8.          GBLC  &KVRSN,&KSYS                                    @SC89027 00306500
  9.          LCLA  &LEN                                                     00307000
  10.          AIF   ('&KVRSN' EQ '4.2' OR '&KSYS' EQ '').VOK        @SC90072 00307200
  11.    MNOTE 16,'* * * --> IK0MAC version number should be &KVRSN' @SC89027 00307400
  12. .VOK     ANOP                                                  @SC89027 00307600
  13.          AIF   ('&KW' NE '').KW                                         00308000
  14. &LABEL   DC    X'FF'                                                    00309000
  15.          AGO   .DONE                                                    00310000
  16. .KW      AIF   ('&KW' NE 'GOTO').KWN                                    00311000
  17. &LABEL   DC    AL1(254),AL3(&ADDR)                             @SC88168 00312000
  18.          MEXIT                                                          00313000
  19. .KWN     ANOP                                                           00314000
  20. &LEN     SETA  K'&KW-3                                                  00315000
  21. &LABEL   DC    AL1(&LEN.),AL3(&ADDR.),AL1(&MIN.-1),C&KW        @SC88168 00316000
  22. .DONE    MEND                                                           00317000
  23. *COPY                                                 SCAN              00318000
  24.          MACRO                                                          00319000
  25. &LABEL   SCAN  &TABLE,&HELP,&NODISP                            @SC87320 00320000
  26. .* Parse input using a KW table. Setup already done via NTOKN or CTOKN. 00321000
  27. .* Dispatch to proper handler if found in table, else return.           00322000
  28. .*  &1: adr of relevant table (LA/R), &2: handler if '?' (LA),          00323000
  29. .*  &3: if 'NODISP', then dispatch to HELP handler with high byte of    00324000
  30. .*  R7 not 0 and (R1)-> KW entry (if found)                             00325000
  31. &LABEL   LREG  1,&TABLE                                        @SC86295 00326000
  32.          AIF   ('&NODISP' EQ '').CALL                          @SC87320 00327000
  33.          AIF   ('&NODISP' NE 'NODISP').ERR                     @SC87320 00328000
  34.          ICM   7,8,*                                           @SC87320 00329000
  35. .CALL    BAL   14,SCAN                                         @SC87320 00330000
  36.           B    &HELP                                           @SC86135 00331000
  37.          MEXIT                                                 @SC87320 00332000
  38. .ERR     MNOTE 2,'Invalid positional parameter &NODISP'        @SC87320 00333000
  39.          MEND                                                           00334000
  40. *COPY                                                 HELP              00335000
  41.          MACRO                                                          00336000
  42. &LABEL   HELP  &TABLE,&RETURN                                           00337000
  43. .* Display acceptable keywords, then branch                             00338000
  44. .*  &1: ptr to table (LA/R), &2: place to branch (LA)                   00339000
  45. &LABEL   LREG  1,&TABLE                                        @SC86295 00340000
  46.          BAL   14,HELPKW                                                00341000
  47.           B    &RETURN                                         @SC86135 00342000
  48.          MEND                                                           00343000
  49. *COPY                                                 NTOKN             00344000
  50.          MACRO                                                          00345000
  51. &LABEL   NTOKN &H=,&N=                                                  00346000
  52. .* Pick next token, optionally test for ?                               00347000
  53. .*  &H= handler if '?' (LA), &N= handler if none (LA)                   00348000
  54. &LABEL   BAL   14,WSPTOK                                                00349000
  55.           B    &N                                              @SC86135 00350000
  56.          AIF   ('&H' EQ '').H                                           00351000
  57.          CLI   0(6),C'?'                                       @SC86115 00352000
  58.          BE    &H                                                       00353000
  59. .H       MEND                                                           00354000
  60. *COPY                                                 FTOKN             00355000
  61.          MACRO                                                          00356000
  62. &LABEL   FTOKN &H=,&N=                                                  00357000
  63. .* Find start of next token, optionally test for ?                      00358000
  64. .*  &H= handler if '?' (LA), &N= handler if none (LA)                   00359000
  65. &LABEL   BAL   9,WSP                                           @SC86295 00360000
  66.           B    &N                                              @SC86224 00361000
  67.          AIF   ('&H' EQ '').H                                  @SC86224 00362000
  68.          CLI   0(7),C'?'                                                00363000
  69.          BE    &H                                                       00364000
  70. .H       MEND                                                           00365000
  71. *COPY                                                 PTEXT             00366000
  72.          MACRO                                                          00367000
  73. &LABEL   PTEXT &TEXT,&LEN,&AREG=3,&LREG=4                               00368000
  74. .* Set up 2 registers to point to some text and contain the length      00369000
  75. .*  &1: 'text' (where text has no doubled ' or & characters)  OR        00370000
  76. .*  &1: text (LA/R), &2: length of text (LA/R),                         00371000
  77. .*  &AREG= reg for ptr, &LREG= reg for len                              00372000
  78.          LCLA  &TEXTL                                                   00373000
  79.          AIF   ('&TEXT'(1,1) EQ '''').TEXT                     @SC86355 00374000
  80. &LABEL   LREG  &AREG,&TEXT                                     @SC86295 00375000
  81.          AGO   .LEN                                            @SC86355 00376000
  82. .TEXT    ANOP                                                           00377000
  83. &TEXTL   SETA  K'&TEXT-2                                                00378000
  84. &LABEL   LA    &AREG,=C&TEXT                                            00379000
  85.          AIF   ('&LEN' NE '').LEN                              @SC86355 00380000
  86.          LA    &LREG,&TEXTL                                             00381000
  87.          MEXIT                                                          00382000
  88. .LEN     LREG  &LREG,&LEN                                      @SC86295 00383000
  89.          MEND                                                           00384000
  90. *COPY                                                 KCALL             00385000
  91.          MACRO                                                          00386000
  92. &LABEL   KCALL &NAME,&VALUE,&EXT,&E=                                    00387000
  93. .* Call a routine, fill R1 with a parm if any, and allow error branch   00388000
  94. .*  &1: routine name or (reg), &2: argument (LA/R) (opt),      @SC87275 00389000
  95. .*  &3: EXT if non-Kermit,                                     @SC87275 00390000
  96. .*  &E= branch if R15 NZ (LA) or (branch,cc) with cc=suffix of B instr  00391000
  97.          LCLC  &CC                                             @SC86135 00392000
  98. &CC      SETC  'NZ'          Default condition                 @SC86135 00393000
  99. &LABEL   LREG  1,&VALUE                                        @SC86295 00394000
  100.          AIF   ('&EXT' NE 'EXT').INTRN                         @SC86295 00395000
  101.          L     15,=V(&NAME)                                    @SC86295 00396000
  102.          AGO   .BAL                                            @SC87012 00397000
  103. .INTRN   AIF   ('&NAME'(1,1) NE '(').INTRNL                    @SC87275 00398000
  104.          LREG  15,&NAME                                        @SC87275 00399000
  105.          AGO   .BAL                                            @SC87275 00400000
  106. .INTRNL  L     15,=A(&NAME)                                    @SC89215 00401000
  107. .BAL     BALR  14,15                                           @SC87012 00402000
  108.          AIF   ('&E' EQ '').NOERR                                       00403000
  109.          AIF   ('&EXT' NE 'EXT').NOLT                          @SC87012 00404000
  110.          LTR   15,15                                           @SC87012 00405000
  111. .NOLT    AIF   (N'&E LT 2).NCC                                 @SC87012 00406000
  112. &CC      SETC  '&E(2)'                                         @SC86135 00407000
  113. .NCC      B&CC &E(1)                                           @SC86135 00408000
  114. .NOERR   MEND                                                           00409000
  115. *COPY                                                 ADCON             00410000
  116.          MACRO                                                          00411000
  117.          ADCON                                                          00412000
  118. .* Define address constants for subroutine calls, etc.  Takes a list.   00413000
  119.          LCLA  &N                                              @SC86295 00414000
  120. .LUP     AIF   (&N GE N'&SYSLIST).DUN                          @SC86295 00415000
  121. &N       SETA  &N+1                                            @SC86295 00416000
  122. A&SYSLIST(&N) DC A(&SYSLIST(&N))                               @SC87201 00417000
  123.          AGO   .LUP                                            @SC86295 00418000
  124. .DUN     MEND                                                           00419000
  125. *COPY                                                 LREG              00420000
  126.          MACRO                                                          00421000
  127. &LABEL   LREG  &R,&VAL                                         @SC86295 00422000
  128. .* Load register with parameter                                         00423000
  129. .*  &1: reg, &2: value (LA) or (reg) or omitted                         00424000
  130.          AIF   ('&VAL' EQ '').OKREG                            @SC86295 00425000
  131.          AIF   ('&VAL'(1,1) EQ '(').REG                        @SC86295 00426000
  132. &LABEL   LA    &R,&VAL                                         @SC86295 00427000
  133.          MEXIT                                                 @SC86295 00428000
  134. .REG     AIF   ('&VAL' EQ '(&R)').OKREG                        @SC86295 00429000
  135. &LABEL   LR    &R,&VAL(1)                                      @SC86295 00430000
  136.          MEXIT                                                 @SC86295 00431000
  137. .OKREG   AIF   ('&LABEL' EQ '').Z                              @SC86295 00432000
  138. &LABEL   DS    0H                                              @SC86295 00433000
  139. .Z       MEND                                                  @SC86295 00434000
  140. *COPY                                                 OPENF             00435000
  141.          MACRO                                                          00436000
  142. &LABEL   OPENF &MODE,&NAME,&FDB,&FID,&E=                                00437000
  143. .* Open file for input or output or test existence                      00438000
  144. .*  &1: S|L|I|O|T,  &2: file name (LA/R), &3: pattern FDB (LA/R),       00439000
  145. .*  &4: file ticket (LA) (opt), &E= error branch (see KCALL)            00440000
  146.          LCLA  &CODE                                           @SC86295 00441000
  147.          AIF   ('&MODE' NE 'S').CKL                            @SC90037 00441700
  148. &CODE    SETA  11            Check size                        @SC90037 00441800
  149.          AGO   .MOK                                            @SC90037 00441900
  150. .CKL     AIF   ('&MODE' NE 'L').CKI                            @SC90037 00442000
  151. &CODE    SETA  22                                              @SC89073 00442200
  152.          AGO   .MOK                                            @SC89073 00442400
  153. .CKI     AIF   ('&MODE' NE 'I').CKO                            @SC89073 00442600
  154. &CODE    SETA  1                                               @SC86295 00443000
  155.          AGO   .MOK                                            @SC86295 00444000
  156. .CKO     AIF   ('&MODE' NE 'O').CKT                            @SC86295 00445000
  157. &CODE    SETA  2                                               @SC86295 00446000
  158.          AGO   .MOK                                            @SC86295 00447000
  159. .CKT     AIF   ('&MODE' NE 'T').ILLM                           @SC86295 00448000
  160. &CODE    SETA  3                                               @SC86295 00449000
  161.          AIF   ('&FID' NE '').ILLF                             @SC86295 00450000
  162. .MOK     ANOP  ,                                               @SC86295 00451000
  163. &LABEL   LA    0,&CODE                                         @SC86295 00452000
  164.          LREG  2,&NAME                                         @SC86295 00453000
  165.          AIF   ('&MODE' NE 'S').CALL                           @SC90037 00453200
  166.          LREG  6,&FID                                          @SC90037 00453400
  167. .CALL    ANOP                                                  @SC90037 00453600
  168.          KCALL DISKIO,&FDB,E=&E                                @SC86295 00454000
  169.          AIF   ('&FID' EQ '' OR '&MODE' EQ 'S').Z              @SC90037 00455000
  170.          ST    0,&FID                                          @SC86295 00456000
  171. .Z       MEXIT                                                 @SC86295 00457000
  172. .ILLM    MNOTE 2,'ILLEGAL MODE ''&MODE'''                               00458000
  173.          MEXIT                                                 @SC86295 00459000
  174. .ILLF    MNOTE 2,'FID NOT ALLOWED WITH MODE ''&MODE'''                  00460000
  175.          MEND                                                           00461000
  176. *COPY                                                 CLOSF             00462000
  177.          MACRO                                                          00463000
  178. &LABEL   CLOSF &FID,&E=                                                 00464000
  179. .* Call DSKIO to close a file and zero ticket.  NOP if already 0.       00465000
  180. .*  &1: file ticket (LA) (opt), &E= error branch (see KCALL)            00466000
  181. &LABEL   LA    0,4                                             @SC86295 00467000
  182. .CAL     KCALL DISKIO,&FID,E=&E                                @SC86295 00468000
  183.          MEND                                                           00469000
  184. *COPY                                                 ERRF              00470000
  185.          MACRO                                                          00471000
  186. &LABEL   ERRF                                                           00472000
  187. .* Call DISKIO to analyze an error code in R15 (no options)             00473000
  188. .* Clobbers TMPDW                                                       00474000
  189. &LABEL   LA    0,12                                            @SC87338 00475000
  190.          CVD   15,TMPDW      Save error code                   @SC87338 00476000
  191.          KCALL DISKIO        Keep registers same               @SC87338 00477000
  192.          MEND                                                           00478000
  193. *COPY                                                 ERASF             00479000
  194.          MACRO                                                          00480000
  195. &LABEL   ERASF &NAME,&E=                                                00481000
  196. .* Call DISKIO to erase a file                                          00482000
  197. .*  &1: file name (LA/R), &E= error branch (see KCALL)                  00483000
  198. &LABEL   LA    0,14                                            @SC86295 00484000
  199.          KCALL DISKIO,&NAME,E=&E                               @SC86295 00485000
  200.          MEND                                                           00486000
  201. *COPY                                                 NXTFSET           00487000
  202.          MACRO                                                          00488000
  203. &LABEL   NXTFSET &NAME,&TYPE,&E=                                        00489000
  204. .* Call DISKIO to set up search for files                               00490000
  205. .*  &1: file name (LA/R), &2: CWD => checking validity for CWD,         00491000
  206. .*  END => closing file name search,                                    00492000
  207. .*  &E= error branch (see KCALL)                                        00493000
  208.          LCLA  &CODE                                           @SC86295 00494000
  209. &CODE    SETA  5             Ordinary setup                    @SC86295 00495000
  210.          AIF   ('&TYPE' EQ '').TOK                             @SC86295 00496000
  211. &CODE    SETA  7             End of search                     @SC86355 00497000
  212.          AIF   ('&TYPE' EQ 'END').TOK                          @SC86355 00498000
  213. &CODE    SETA  8             Check CWD string                  @SC86295 00499000
  214. .TOK     ANOP                                                           00500000
  215. &LABEL   LA    0,&CODE                                         @SC86295 00501000
  216.          KCALL DISKIO,&NAME,E=&E  Init for NXTFST call         @SC86295 00502000
  217.          MEND                                                           00503000
  218. *COPY                                                 NXTF              00504000
  219.          MACRO                                                          00505000
  220. &LABEL   NXTF  &E=                                                      00506000
  221. .* Call DISKIO to get next file name in FILNAM                          00507000
  222. .*  &E= error branch (see KCALL)                                        00508000
  223. &LABEL   LA    0,6                                             @SC86295 00509000
  224.          KCALL DISKIO,E=&E   Find next file                    @SC86295 00510000
  225.          MEND                                                           00511000
  226. *COPY                                                 RET               00512000
  227.          MACRO                                                          00513000
  228. &LABEL   RET   &TYPE                                                    00514000
  229. .* Generate return from subroutines.                                    00515000
  230. .*  &1: MAIN if return from Kermit main code                            00516000
  231.          AIF   ('&TYPE' EQ 'MAIN').RMAIN                       @SC86295 00517000
  232. &LABEL   B     RTRN                                            @SC86295 00518000
  233.          MEXIT                                                          00519000
  234. .RMAIN   ANOP                                                           00520000
  235. &LABEL   KMAIN RETURN        Back to system                    @SC89268 00523000
  236.          MEND                                                           00528000
  237. *COPY                                                 ENTER             00529000
  238.          MACRO                                                          00530000
  239. &LABEL   ENTER &TYPE                                           @SC86295 00531000
  240. .* Establish routine entry code                                         00532000
  241. .*  &1: ALT if 2ndary entry or MAIN if main program                     00533000
  242.          GBLC  &RTN                                            @SC86295 00534000
  243.          AIF   ('&TYPE' EQ 'ALT').ALT                          @SC86141 00535000
  244. &RTN     SETC  '&LABEL'                                                 00536000
  245. &LABEL   CSECT                                                          00537000
  246.          USING &RTN.SV,13                                      @SC86295 00538000
  247.          USING &LABEL,KSUBBASE                                 @SC89268 00539000
  248.          SAVE  (14,12),,&LABEL                                 @SC86141 00540000
  249.          AIF   ('&TYPE' NE 'MAIN').ORD                         @SC86295 00541000
  250.          KMAIN ENTER                                           @SC89268 00542000
  251.          AGO   .ORD                                            @SC86141 00555000
  252. .ALT     ENTRY &LABEL                                          @SC86141 00556000
  253.          USING &LABEL,15                                       @SC89215 00556500
  254. &LABEL   SAVE  (14,12),,*                                      @SC86141 00557000
  255.          L     15,=A(&RTN)   Start of main routine             @SC89215 00558000
  256.          DROP  15                                              @SC89215 00558500
  257. .ORD     LA    0,&RTN.LX                                       @SC86295 00559000
  258.          BAL   14,SUBENT                                       @SC86295 00560000
  259.          MEND                                                           00561000
  260. *COPY                                                 EXIT              00562000
  261.          MACRO                                                          00563000
  262.          EXIT                                                           00564000
  263. .* Assembler stuff for end of routine and end of local temporaries      00565000
  264.          GBLC  &RTN                                            @SC86295 00566000
  265.          DS    0D                                              @SC86295 00567000
  266. &RTN.LX  EQU   *-&RTN.SV                                       @SC86295 00568000
  267.          DROP  13,KSUBBASE                                     @SC89268 00569000
  268.          MEND                                                           00570000
  269. *COPY                                                 LOCALS            00571000
  270.          MACRO                                                          00572000
  271.          LOCALS                                                         00573000
  272. .* Define storage for save area.  Follow with temporaries               00574000
  273.          GBLC  &RTN                                            @SC86295 00575000
  274. .LT      LTORG                                                 @SC86141 00576000
  275. &RTN.SV  DSECT                                                 @SC86295 00577000
  276.          DS    18F                                             @SC86295 00578000
  277.          MEND                                                           00579000
  278. *COPY                                                 ASCSYM            00580000
  279.          MACRO                                                          00581000
  280.          ASCSYM &LIST                                                   00582000
  281. .* Define symbols (of form 'Ax') for ASCII upper-case & digits          00583000
  282.          LCLA  &I,&N                                                    00584000
  283.          LCLC  &C                                                       00585000
  284. &N       SETA  K'&LIST       Number of chars                            00586000
  285. &I       SETA  0                                                        00587000
  286. .LP      AIF   (&I GE &N).DONE                                          00588000
  287. &I       SETA  &I+1                                                     00589000
  288. &C       SETC  '&LIST'(&I,1)                                            00590000
  289.          AIF   ('&C' LT 'A').LP                                         00591000
  290.          AIF   ('&C' GT 'I').TRJR                                       00592000
  291. A&C      EQU   C'&C'-128                                                00593000
  292.          AGO   .LP                                                      00594000
  293. .TRJR    AIF   ('&C' GT 'R').TRSZ                                       00595000
  294. A&C      EQU   C'&C'-135                                                00596000
  295.          AGO   .LP                                                      00597000
  296. .TRSZ    AIF   ('&C' GT 'Z').TRNUM                                      00598000
  297. A&C      EQU   C'&C'-143                                                00599000
  298.          AGO   .LP                                                      00600000
  299. .TRNUM   AIF   ('&C' GT '9').LP                                         00601000
  300. A&C      EQU   C'&C'-192                                                00602000
  301.          AGO   .LP                                                      00603000
  302. .DONE    MEND                                                           00604000
  303. *COPY                                                 NOTQR             00605000
  304.          MACRO                                                          00606000
  305. &LABEL   NOTQR &BRANCH                                         @SC86120 00607000
  306. .* Test for an Ascii char range of 33-62 and 96-126                     00608000
  307. .*  &1: branch if out of range (LA)                                     00609000
  308. &LABEL   BAL   14,CHKQR                                        @SC86120 00610000
  309.           B    &BRANCH                                         @SC86120 00611000
  310.          MEND                                                           00612000
  311. *COPY                                                 UNCHR             00613000
  312.          MACRO                                                          00614000
  313. &LABEL   UNCHR ®,&DATA,&TO                                           00615000
  314. .* UnChr: Subtract an ASCII space.  Set cc=M if too small.              00616000
  315. .*  &1: reg for value, &2: source (LA) if not &1, &3: dest (LA) (opt)   00617000
  316. &LABEL   CCHAR ®,&DATA,&TO,S,SPACE                                   00618000
  317.          MEND                                                           00619000
  318. *COPY                                                 TOCHR             00620000
  319.          MACRO                                                          00621000
  320. &LABEL   TOCHR ®,&DATA,&TO                                           00622000
  321. .* ToChr: Add an ASCII space                                            00623000
  322. .*  &1: reg for value, &2: source (LA) if not &1, &3: dest (LA) (opt)   00624000
  323. &LABEL   CCHAR ®,&DATA,&TO,A,SPACE                                   00625000
  324.          MEND                                                           00626000
  325. *COPY                                                 CTL               00627000
  326.          MACRO                                                          00628000
  327. &LABEL   CTL   ®,&DATA,&TO                                           00629000
  328. .* CTL: Reverse bit 6 to make a ctl char printable and vice versa       00630000
  329. .*  &1: reg for value, &2: source (LA) if not &1, &3: dest (LA) (opt)   00631000
  330. &LABEL   CCHAR ®,&DATA,&TO,X,F64                            @SC86120 00632000
  331.          MEND                                                           00633000
  332. *COPY                                                 CCHAR             00634000
  333.          MACRO                                                          00635000
  334. &LABEL   CCHAR ®,&DATA,&TO,&OP,&VALUE                                00636000
  335. .* CCHAR: Used by CTL/UNCHR/TOCHR to add/subtract number                00637000
  336. .*  &1: reg for value, &2: source (LA) if not &1, &3: dest (LA) (opt),  00638000
  337. .*  &4: opcode for change, &5: operand                                  00639000
  338.          AIF   ('&LABEL' EQ '').NOLAB                                   00640000
  339. &LABEL   DS    0H                                                       00641000
  340. .NOLAB   AIF   ('&DATA' EQ '').NODATA                                   00642000
  341.          SR    ®,®                                       @SC86120 00643000
  342.          IC    ®,&DATA                                               00644000
  343. .NODATA  &OP   ®,&VALUE                                              00645000
  344.          AIF   ('&TO' EQ '').TO                                         00646000
  345.          STC   ®,&TO                                                 00647000
  346. .TO      MEND                                                           00648000
  347. *COPY                                                 MSGDF             00649000
  348.          MACRO                                                          00650000
  349.          MSGDF &NM,&TEXT                                                00651000
  350. .* Define error message table entry and pointer                         00652000
  351. .*  &1: 3-letter error code, &2: 'text of message'                      00653000
  352. ERRTAB   CSECT                                                          00654000
  353. ERR&NM   EQU   (*-ERRTAB)/4  Symbolic error number                      00655000
  354.          DC    AL1(L'MSG&NM),AL3(MSG&NM)                                00656000
  355. ERRMSGS  CSECT                                                          00657000
  356. MSG&NM   DC    C&TEXT                                                   00658000
  357.          MEND                                                           00659000
  358. *COPY                                                 RETREG            00660000
  359.          MACRO                                                          00661000
  360. &LABEL   RETREG &ARG                                                    00662000
  361. .* Return current register value(s) to caller.  Clobbers R1.            00663000
  362. .*  &1(1): register to be returned, &1(2): register containing value,   00664000
  363. .*  &2(1): ditto, etc.                                                  00665000
  364.          LCLC  ®,&CUR                                       @SC89218 00666000
  365.          LCLA  &N,&RO                                          @SC89218 00667000
  366. &LABEL   L     1,4(,13)      Get ptr to save area              @SC89218 00668000
  367. &N       SETA  1                                               @SC89218 00669000
  368. .LQ      AIF   ('&SYSLIST(&N)' EQ '').LP                       @SC89218 00670000
  369.          AIF   (N'&SYSLIST(&N) GT 2).ERR1                      @SC89218 00671000
  370. ®     SETC  '&SYSLIST(&N,1)'                                @SC89218 00672000
  371. &CUR     SETC  '&SYSLIST(&N,2)'                                @SC89218 00673000
  372.          AIF   ('®' EQ '').ERR2                             @SC89218 00674000
  373.          AIF   ('&CUR' NE '').L1                               @SC89218 00675000
  374. &CUR     SETC  '®'                                          @SC89218 00676000
  375. .L1      AIF   (T'&SYSLIST(&N,1) NE 'N').ERR3                  @SC89218 00677000
  376. &RO      SETA  ®-11                                         @SC89218 00678000
  377.          AIF   (&RO GE 2).L2                                   @SC89218 00679000
  378. &RO      SETA  ®+5                                          @SC89218 00680000
  379. .L2      ANOP                                                  @SC89218 00681000
  380. &RO      SETA  4*&RO                                           @SC89218 00682000
  381.          ST    &CUR,&RO.(,1)                                   @SC89218 00683000
  382. .LP      ANOP                                                  @SC89218 00684000
  383. &N       SETA  &N+1                                            @SC89218 00685000
  384.          AIF   (&N LE N'&SYSLIST).LQ                           @SC89218 00686000
  385.          MEXIT                                                 @SC89218 00687000
  386. .ERR1    MNOTE 12,'Too many items in &SYSLIST(&N)'             @SC89218 00688000
  387.          MEXIT                                                 @SC89218 00689000
  388. .ERR2    MNOTE 12,'Register not specified in &SYSLIST(&N)'     @SC89218 00690000
  389.          MEXIT                                                 @SC89218 00691000
  390. .ERR3    MNOTE 12,'Non-numeric register in &SYSLIST(&N)'       @SC89218 00692000
  391.          MEND                                                           00693000
  392. *COPY                                                 POINTF            00694000
  393.          MACRO                                                          00695000
  394. &LABEL   POINTF &FID,&OPTS,&E=                                          00696000
  395. .* Call DISKIO to skip records just after OPEN                          00697000
  396. .*  &1: file ticket (LA/R), &2: ptr to # of records to skip             00698000
  397. .*  &E= error branch (see KCALL)                                        00699000
  398.          AIF   ('&OPTS' EQ '').ERR1                            @SC89218 00700000
  399. &LABEL   LA    0,23                                            @SC89218 00701000
  400.          ICM   2,15,&OPTS    Get number to skip                @SC89218 00702000
  401.          KCALL DISKIO,&FID,E=&E                                @SC89218 00703000
  402.          MEXIT                                                 @SC89218 00704000
  403. .ERR1    MNOTE 12,'Missing record count'                       @SC89218 00705000
  404.          MEND                                                           00706000
  405. *COPY                                                 HTBL              00707000
  406.          MACRO                                                          00708000
  407. &LABEL   HTBL  &A,&B,&C,&D,&E,&F,&G,&H,&I,&J,&K,&L,&M,&N,&O,&P          00709000
  408. .* Assemble a hex constant with comma delimiters                        00710000
  409. .*  &1-&16: up to 16 hex strings                                        00711000
  410. &LABEL   DC    X'&A&B&C&D&E&F&G&H&I&J&K&L&M&N&O&P'             @SC89268 00712000
  411.          MEND                                                  @SC89268 00713000
  412. *COPY                                                 CHECKVER          00714000
  413.          MACRO                                                          00715000
  414. &LABEL   CHECKVER &NAME,&VER                                            00716000
  415. .* Verify that the version numbers in source components match           00717000
  416. .*  &1: source component name, &2: version number of component          00718000
  417.          GBLC  &KVRSN                                          @SC90072 00719000
  418.          AIF   ('&KVRSN' EQ '&VER').VOK                        @SC90072 00720000
  419.    MNOTE 16,'* * * --> &NAME version number should be &KVRSN'  @SC90072 00721000
  420.    MNOTE 16,'* * * --> You are attempting to use version &VER' @SC90072 00722000
  421. .VOK     MEND                                                  @SC90072 00723000
  422.